namespace Todo;

public class ResponseObject<T>
{
    public Object? Data { get; set; }
    public string? Message { get; set; }
    public ResponseResult Status { get; set; }

    public ResponseObject<T> OK(T data, string message)
    {
        Status = ResponseResult.Success;
        Data = data;
        Message = message;
        return this;
    }

    public ResponseObject<T> Fail(T data, string message)
    {
        Status = ResponseResult.Fail;
        Data = data;
        Message = message;
        return this;
    }
    public ResponseObject<T> Fail(T data, string message,ResponseResult result)
    {
        Status = result;
        Data = data;
        Message = message;
        return this;
    }

    public ResponseObject<T> Error(T data, string message)
    {
        Status = ResponseResult.Error;
        Data = data;
        Message = message;
        return this;
    }
}